using UnityEngine;
using System.Collections;

public class menuScript : MonoBehaviour {
	
	
	 int posicao = 1 ;
	public GameObject bola;
	GameObject botao1posicao;
	GameObject botao2posicao ;
	GameObject botao3posicao ;
	
	
	// Use this for initialization
	void Start () {
	
   		botao1posicao.transform.position = new Vector3(0,3,0);
		botao2posicao.transform.position = new Vector3(0,1,0);
		botao3posicao.transform.position = new Vector3(0,-1,0);
	
		
	}
	
	// Update is called once per frame
	void Update () {
	
		Debug.Log(posicao);	
		
		//descer a bolinha
		if(Input.GetKeyDown(KeyCode.DownArrow)){
			posicao++;
			Debug.Log(posicao);	
		}
			
		if(Input.GetKeyDown(KeyCode.UpArrow)){
			posicao--;
			Debug.Log(posicao);	
		}
		//--------------
		
		//-------------
		if(posicao == 1)
			bola.transform.position = new Vector3(bola.transform.position.x,2.5f,bola.transform.position.z);
		
		if(posicao == 2 )
			bola.transform.position = new Vector3(bola.transform.position.x,0.5f,bola.transform.position.z);			
		
		if(posicao == 3 )
			bola.transform.position = new Vector3(bola.transform.position.x,-2,bola.transform.position.z);
		//-----------
		
		//apertou o botao
		if(posicao == 1 && Input.GetKeyUp(KeyCode.Space)){
			Debug.Log("Jogar");		
			Application.LoadLevel("Fase01");
		}
		if(posicao == 2 && Input.GetKeyUp(KeyCode.Space)){
			Debug.Log("Instrussao");	
			//Application.LoadLevel();
		}
		if(posicao == 3 && Input.GetKeyUp(KeyCode.Space)){
			Debug.Log("Creditos");	
			//Application.LoadLevel();
		}
		//---------------
		
		
		
		if(posicao > 3){
			posicao = 1;
			Debug.Log(posicao);
			}
		if(posicao < 1){
		    posicao = 3;
			Debug.Log(posicao);
			}
		
		
		
	}
}
